const defaultState = {
    login_token:""
}
//reducer 可以接受state但是不可以修改state 只有store才能改变
export default (state = defaultState, action)=> {
    console.log(state,action);
    if(action.type === 'login_token'){
        const newState = JSON.parse(JSON.stringify(state))
        newState.login_token = action.login_token
        return newState   //返回给了store
    }
    return state;
}
